﻿<%@ Page Language="C#" MasterPageFile="~/Header.Master" AutoEventWireup="true" CodeBehind="Friends.aspx.cs" Inherits="geekmeet.Friends" %>

<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
    <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
    <script src="/Scripts/jquery.bgiframe-2.1.2.js" type="text/javascript"></script>
    <script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js" type="text/javascript"></script>
    <script src="/Scripts/geekmeet.js" type="text/javascript"></script>
    <link href="/site.css" rel="stylesheet" type="text/css" />
</asp:Content>    

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <div id="mainWrapper">
    
     <asp:SiteMapPath ID="SiteMapPath1" runat="server" CssClass="breadcrumbs">
        </asp:SiteMapPath>
    
    <asp:Panel ID="panNewFriends" runat="server" Visible="False" CssClass="panNewFriends">
     <span class="pageHeader">Nya vänförfrågningar</span>
        <asp:Repeater ID="newFriendRepeater" runat="server">
            <ItemTemplate>
                <div class="newFriendContainer">
                    <a href="Profile.aspx?user=<%#Eval("UserID") %>"><img class="mediumProfileImage" src="/images/profilePictures/<%#Eval("UserID") %>.jpg" /></a>
                    <div class="newFriendDetails">
                         <a href="Profile.aspx?user=<%#Eval("UserID") %>">
                                <span class="pageSubHeader"><%#Eval("UserName") %></span>
                         </a>
                         <br />
                         <span class="details"><%#Eval("FriendCategoryName") %></span><br />
                    </div>
                    <div class="newFriendConfirmContainer">
                        Vill du lägga till <%#Eval("UserName") %> som vän? <br />
                        <a href="?action=confirmFriend&user=<%#Eval("UserID") %>&accept=true">Ja</a>
                        <a href="?action=confirmFriend&user=<%#Eval("UserID") %>&accept=false">Nej</a>
                    </div>
                </div>
            </ItemTemplate>
        </asp:Repeater>

    </asp:Panel>

    <div id="friendsListWrapper">
       <span class="pageHeader">
            <asp:Label ID="lblUsername" runat="server" Text=""></asp:Label>
            </span>
        <asp:Repeater ID="catRepeater" runat="server">
                <ItemTemplate>
                <div class="friendsCatWrapper">
                <asp:HiddenField ID="hiddenCurrentCat" runat="server" 
                value = '<%#Container.DataItem %>' ClientIDMode="Predictable" />
                    <h2><%#Container.DataItem %></h2>
                
                    <asp:Repeater ID="friendRepeater" runat="server" >
                        <ItemTemplate>
                            <div class="friendContainer">
                           
                                  <a href="Profile.aspx?user=<%#DataBinder.Eval(Container.DataItem, "UserID")%>"><img class="mediumProfileImage" src="/images/profilePictures/<%#(string) DataBinder.Eval(Container.DataItem, "UserID").ToString() %>.jpg" />
                              
                                    <span class="pageSubHeader">
                                        <%#DataBinder.Eval(Container.DataItem, "UserName")%>
                                        <img src="/images/icons/<%#wcf.GetGender( Guid.Parse(Eval("UserID").ToString()) )%>.png" />
                                        <span class="details"><%#wcf.GetAge( Guid.Parse( Eval("UserID").ToString() ) )%></span>
                                        <br />
                                        <span class="details"><%#wcf.GetCity( Guid.Parse( Eval("UserID").ToString() ) )%></span>
                                    </span>
                                  </a>
                              </div>
                   
                        </ItemTemplate>
                    </asp:Repeater>

                    </div><br />
                </ItemTemplate>
            </asp:Repeater>
       </div>
   </div>
</asp:Content>